﻿using System;
using System.Collections.Generic;
using System.Text;

namespace EasyOAuth.Core.Web
{
    /// <summary>
    /// 接口固定数据结构
    /// </summary>
    public class ApiResult
    {
        /// <summary>
        /// 错误描述 0=成功过
        /// </summary>
        public int Code { get; set; }

        /// <summary>
        ///  错误消息
        /// </summary>
        public string Msg { get; set; } = String.Empty;

        /// <summary>
        /// 数据结构
        /// </summary>
        public object Data { get; set; } = new object();
    }

    /// <summary>
    /// 分页数据结构
    /// </summary>
    public class ApiPageResult<T> where T : class, new()
    {
        /// <summary>
        /// 行数据
        /// </summary>
        public T Rows { get; set; } = new T();

        /// <summary>
        /// 数据大小
        /// </summary>
        public int Total { get; set; }
    }
}
